<template>
    <div>
        <p @click="post_search">post_search</p>
        <p @click="post_insert">post_insert</p>
        <p @click="post_delete">post_delete</p>
        <p @click="post_upData">post_upData</p>
    </div>
</template>

<script>
export default {
    name: 'HelloWorld',
    data () {
        return {
            list: {
                action: 'search',
            },
        }
    },
    components:{},
    methods:{
        post_search(){
            this.list.action = "search";
            this.$post("index.php",{
                action : "search"
            }).then((result) => {
                console.log(result);
                this.return = result;
            }).catch((err) => {
                
            });;
        },
        post_insert(){
            this.list.action = "insert";
            this.$post("index.php",this.list);
        },
        post_delete(){
            this.list.action = "delete";
            this.$post("index.php",this.list);
        },
        post_upData(){
            this.list.action = "upData";
            this.$post("index.php",this.list);
        },
    }
}
</script>